1
general::
The ability to act sensibly, promptly, and appropriately, especially in a difficult situation or emergency. For example, Distraught about losing her wallet and passport, she had the presence of mind to notify the authorities at once. This idiom in effect says that one's mind is present and functioning. [Second half of 1600s]
American Heritage Idioms